﻿using System.Collections.Generic;

namespace Colorful.Furniture.MpManagement
{
    /// <summary>
    ///  模版消息输出
    /// </summary>
    public class TemplateOutputDto
    {
        public TemplateOutputDto()
        {
            TemplateItemData = new List<TemplateItemDataOutputDto>();
        }

        /// <summary>
        ///  模版消息ID
        /// </summary>
        public string TemplateId { get; set; }

        /// <summary>
        ///  模版消息名字
        /// </summary>
        public string TemplateName { get; set; }

        /// <summary>
        ///  模版项内容
        /// </summary>
        public string TemplateContent { get; set; }

        /// <summary>
        ///  模版项实例
        /// </summary>
        public string TemplateExample { get; set; }

        /// <summary>
        ///  模版项
        /// </summary>
        public List<TemplateItemDataOutputDto> TemplateItemData { get; set; }
    }

    /// <summary>
    ///  模版数据名字和值
    /// </summary>
    public class TemplateItemDataNameAndValueOutputDto
    {
        /// <summary>
        ///  模版数据名字和值
        /// </summary>
        public TemplateItemDataNameAndValueOutputDto()
        {

        }

        /// <summary>
        /// 模版数据名字和值
        /// </summary>
        /// <param name="name">模版项名字</param>
        public TemplateItemDataNameAndValueOutputDto(string name)
        {
            Name = name;
        }

        /// <summary>
        ///   名字，如：orderAmount
        /// </summary>
        public string Name { get; set; }

        /// <summary>
        ///  对应的值
        /// </summary>
        public string Value { get; set; } = "";
    }

    /// <summary>
    ///  模版数据
    /// </summary>
    public class TemplateItemDataOutputDto : TemplateItemDataNameAndValueOutputDto
    {
        /// <summary>
        ///  模版数据
        /// </summary>
        public TemplateItemDataOutputDto()
        {

        }

        /// <summary>
        ///  模版数据
        /// </summary>
        /// <param name="name">模版项名字</param>
        /// <param name="title">模版项标题</param>
        public TemplateItemDataOutputDto(string name, string title) : base(name)
        {
            Title = title;
        }

        /// <summary>
        ///  标题：如：订单金额
        /// </summary>
        public string Title { get; set; }
    }
}